﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;


namespace BUS
{
    public class DangKyLichDiBUS
    {
        public bool DangKyLichDi(DangKyLichDiDTO dk)
        {
            DangKyLichDiDAO dkld = new DangKyLichDiDAO();
            try
            {
                return dkld.DangKyLichDi(dk);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            
        }
        public bool themslDangKyLichDi(DangKyLichDiDTO dk)
        {
            DangKyLichDiDAO dkld = new DangKyLichDiDAO();
            return dkld.themslDangKyLichDi(dk);
            
        }
        
        public DataTable DanhSachLichDi(string sql)
        {
            DangKyLichDiDAO ldb = new DangKyLichDiDAO();
            return ldb.DanhSachLichDi(sql);
        }

        public bool HuyDangKyLichDi(DangKyLichDiDTO ld)
        {
            DangKyLichDiDAO lddao = new DangKyLichDiDAO();
            return lddao.HuyDangKyLichDi(ld);
        }
        public bool HuyslDangKyLichDi(DangKyLichDiDTO ld)
        {
            DangKyLichDiDAO lddao = new DangKyLichDiDAO();
            return lddao.HuyslDangKyLichDi(ld);
        }
    }
}
